package top.eggcode.system.modules.dict.model;

import lombok.Data;
import top.eggcode.common.lang.BeanUnit;

import java.time.LocalDateTime;

/**
 * Title: 字典类型
 * Description: TODO
 * Date: 2021/5/21 20:47
 *
 * @author JiaQi Ding
 * @version 1.0
 */
@Data
public class WordView {

    private String id;

    private String dictId;

    private String name;

    private String nameEn;

    private String value;

    private String remark;

    private Integer sequence;

    private LocalDateTime createdAt;

    public static WordView build(WordEntity entity) {
        WordView view = new WordView();
        BeanUnit.copy(entity, view);
        return view;
    }

    public WordEntity convert() {
        return BeanUnit.transfer(this, WordEntity.class);
    }
}
